package com.yhy.bootjpa.controller;

import com.test.jparest.entity.OidInfo;
import com.yhy.bootjpa.dao.OidDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * describe:
 *
 * @author helloworldyu
 * @date 2018/5/10
 */
@RestController
public class HelloController {
	private final OidDao oidDao;

	@Autowired
	public HelloController(OidDao oidDao) {
		this.oidDao = oidDao;
	}

	@RequestMapping("/")
	OidInfo test() {
		return oidDao.getOne(1);
	}
}